U.S. Pat. No. 7,194,385 describes a data processing device that reduces power consumption by adapting its performance level dependent on its workload. The performance level may be adapted by changing the power supply voltage and/or clock frequency of the data processing device. In this way reduced power consumption can be realized at the cost of lower performance and vice versa increased performance can be realized at the cost of higher power consumption. However, if performance is reduced too far, this has the effect that time-critical tasks will not be completed in time. Accordingly, it is known to adapt the performance level as a function of time dependent on the tasks that are executed at various times.
U.S. Pat. No. 7,194,385 describes a data processing device wherein the required performance level is predicted using measurements of “work done” during previous time intervals. The “work done” represents the historic workload, that is, the number of instructions that had to be executed by the current tasks during these time intervals. If these tasks do not require much work to be done and the performance level is too high, the data processing device will idle, which does not contribute to work done. U.S. Pat. No. 7,194,385 describes how the performance level can be set so as to handle an average of the previous work done with exponentially decaying weights as the work has been done further in the past.
Unfortunately, the workload of a data processing device can vary irregularly as a function of time. As a result, performance level setting dependent on an average has been found to lead to less than optimal results under some circumstances.